<template>
  <div class="details px-12 py-10">
    <div style="margin: 0 auto; width: 60%">
      <div
        v-html="detail"
        style="
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
        "
      ></div>
    </div>
  </div>
</template>
<script setup>
import { onMounted, ref, inject } from "vue";
import news from "@/api/news.js";
import { useRouter, useRoute } from "vue-router";
const allfield = inject("allfield");
const { fieldA, fieldB } = allfield();
const route = useRoute();
const detail = ref({});
const newsDetail = async () => {
  const res = await news.newsDetail(route.query.aid);
  detail.value = res.news.rich_text;
};
onMounted(() => {
  newsDetail();
});
</script>
<style scoped lang="scss">
.details {
}
</style>
